How to: Validate data typed in a control.
Solution:
In the Form Design view, use the 'Validate Rule' property box in the property sheet of the form to validate data entered in a control.
1) If the Database window is not activated, activate the Database window.
2) Click the 'Forms' tab in the Database window.
Forms tab
3) Select the desired form from the list box. (The selected form is highlighted.)
4) Click 'Design'. (The selected form appears in Design view, and the floating Toolbox appears.)
5) Click on the desired control to validate data. (Handles appear around the control.)
6) Select the 'View' menu and select 'Properties'.
7) Click the 'Data' tab.
8) Click on the 'Validate Rule' box. (The Build button appears.)
9) Type the desired expression for validating text.
EXAMPLE: >=Date( )
(where the selected control has the data type of Date and the user is prevented from entering a date prior to the current date).
10) (Optional) Do the following to add a message box when incorrect date has been entered.
a) Click on the 'Validate Text' box.
b) Type the desired message to appear when the user has typed an incorrect date.
11) Select the 'File' menu and select 'Save' to save the form.